<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <!-- UC强制全屏 -->
    <meta name="full-screen" content="yes">
    <!-- QQ强制全屏 -->
    <meta name="x5-fullscreen" content="true">

    <link rel="stylesheet" href="style.css">
    <script src="zepto.min.js"></script>
    <script src="ui.js"></script>

    <link rel="stylesheet" href="dropload/dropload.css"></link>
    <script src="dropload/dropload.js"></script>
    <title>Document</title>
</head>
<body>
<div class="header">
    <a href="index.html">返回</a>
    就当我是新闻页吧
</div>
<div class="list">
    <div class="list-group">

    </div>
</div>
<script>
$('.list').dropload({
    scrollArea : window,
    domUp : {
        domClass   : 'dropload-up',
        domRefresh : '<div class="dropload-refresh">↓下拉刷新-自定义内容</div>',
        domUpdate  : '<div class="dropload-update">↑释放更新-自定义内容</div>',
        domLoad    : '<div class="dropload-load"><span class="loading"></span>加载中-自定义内容top...</div>'
    },
    domDown : {
        domClass   : 'dropload-down',
        domRefresh : '<div class="dropload-refresh">↑上拉加载更多-自定义内容</div>',
        domLoad    : '<div class="dropload-load"><span class="loading"></span>加载中-自定义内容bottom...</div>',
        domNoData  : '<div class="dropload-noData">暂无数据-自定义内容</div>'
    },
    loadUpFn : function(me){
        setTimeout(function(){
            $('.list-group').append('<div class="list-item ellipsis list-item-icon">\
                <img src="images/1.jpg" alt="">\
                Apple 苹果 iPhone 6s Plus (A1699) 16G 玫瑰金色 移动联通电信4G 全网通手机\
            </div>');
            // 每次数据加载完，必须重置
            me.resetload();
            // 解锁loadDownFn里锁定的情况
            me.unlock();
            me.noData(false);
        },1000);
    },
    loadDownFn : function(me){
            setTimeout(function() {
                $('.list-group').append('<div class="list-item ellipsis list-item-icon">\
                    <img src="images/1.jpg" alt="">\
                    Apple 苹果 iPhone 6s Plus (A1699) 16G 玫瑰金色 移动联通电信4G 全网通手机\
                </div>');
                // 每次数据插入，必须重置
                me.resetload();
            }, 1000);
    },
    threshold : 50
});
</script>
</body>
</html>
